import { ui } from "../../ui/layaMaxUI";
import GameInfo from "../../model/GameInfo";
import { GameStatusEnum } from "../../model/Enums";


export default class SteeringWheelView extends ui.scenes.SteeringWheel.SteeringWheelViewUI {
    constructor() {
        super();
    }
    
    

    onEnable() {
        this.width = Laya.stage.width;
        this.height = Laya.stage.height;


        Laya.timer.once(1000, this, () => {
            this.txtTip.visible = false;
        })

        GameInfo.instance.on('gameStatus', this, () => {
            if (GameInfo.instance.gameStatus === GameStatusEnum.GameOver) {
                this.removeSelf();
            }
        })
    }

    onDisable() {
        GameInfo.instance.offAllCaller(this);
    }

    
    
}